﻿@using Sausage.Web.Domain
@using Sausage.Web.DataModel
@using Sausage.Common
@model Sausage.Web.DataModel.Emergency
@{
    ViewBag.Title = string.Format("突发事件详细信息（{0}）", Model.Title);
    Layout = "~/Views/Shared/MainLayout.cshtml";
}
<h2>
    @ViewBag.Title
</h2>
<br />
<div class="form-box">
    <table class="TableDetail">
        <tr>
            <th>
                突发事件
            </th>
            <td>
                @Html.DisplayFor(model => model.Title)
            </td>
        </tr>
        <tr>
            <th>
                事件说明
            </th>
            <td>
                <div class="JournalContent">
                    @Html.Raw(Model.Content)
                </div>
            </td>
        </tr>
        <tr>
            <th>
                发布单位
            </th>
            <td>
                @Html.DisplayFor(model => model.Organization.OrganizationName)
            </td>
        </tr>
        <tr>
            <th>
                发布人
            </th>
            <td>
                @Html.DisplayFor(model => model.Creater)
            </td>
        </tr>
        <tr>
            <th>
                发布日期
            </th>
            <td>
                @string.Format("{0:yyyy年MM月dd日}", Model.CreateDate)
            </td>
        </tr>
        <tr>
            <th>
                相关附件
            </th>
            <td>
                <ul class="AttachmentList">
                    @{
                        foreach (EmergencyAttachment attachment in Model.Attachments)
                        {
                        @Html.Raw("<li>");
                        @Html.ActionLink(attachment.AttachmentName, "DownloadAttachment", new { attachmentID = attachment.AttachmentID }, new { @target = "_blank" })
                        @Html.Raw("</li>");
                        }   
                    }
                </ul>
            </td>
        </tr>
    </table>
</div>
<br />
